﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Configuration.Install;
using System.ServiceProcess;

namespace dotsoftRAID_Service
{
    [RunInstaller(true)]
    public class ServiceInstaller : Installer
    {
        private System.ServiceProcess.ServiceInstaller service;
        private ServiceProcessInstaller serviceProcess;
         
        public ServiceInstaller()
        {
            this.service = new System.ServiceProcess.ServiceInstaller();
            this.serviceProcess = new ServiceProcessInstaller();

            serviceProcess.Account = ServiceAccount.LocalSystem;
            service.ServiceName = "dotsoftRAID Service";
            service.StartType = ServiceStartMode.Automatic;
            service.Description = ".softRAID - Open Source Software RAID";

            Installers.Add(service);
            Installers.Add(serviceProcess);
        }
    }
}
